package com.matrix.java.chap_05.exercise;

import java.util.Scanner;

public class EX5_07 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int sum = 0;
        int num;
        System.out.println("input:");
        do {
            num = input.nextInt();
            sum += num;
        } while (num != 0);
        System.out.println(sum);
    }
}
